home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / message / msgblast / readme.txt < prev    next >
Encoding:
Text File  |  1994-08-18  |  8.0 KB  |  203 lines

  1. 8/18/94
  2. Message Blaster v2.1b
  3. Again, a minor bug fix. When a control was re-subclassed, I wasn't saving 
  4. the target hwnd.
  5.  
  6.  
  7. 5/23/94
  8. Message Blaster v2.1
  9. Minor bug fix. Had a problem with deleting user defined messages in 
  10. the message center. Got an internet account. Should make it easier to 
  11. get ahold of me. 
  12. My new internet address is: edstaff@mcs.com
  13.  
  14.  
  15. 4/23/94
  16.  
  17. Message Blaster v2.0
  18.  
  19. Wow,  lot's of improvements! Let see ... perhaps the biggest thing is 
  20. that the only code you have to write any more is in the message event. 
  21. I added a new property called the message center. It is vastly easier 
  22. to use than the original. As a matter of fact, to use it requires NO 
  23. code to set up. The only thing you have to do is respond to the message 
  24. event!
  25.  
  26. How?
  27.  
  28. I've added a new property called the MsgCenter. When you double-click 
  29. on this property it will bring up a dialog that will allow you to choose 
  30. which control you want to catch messages for, what messages you want to 
  31. catch, and how you want to process them. The cool part is that you don't 
  32. have to choose the target hWnd at run time (Although,   you still can if 
  33. you need to... this thing is 100% backward compatible). All of the original 
  34. functionality is still there, the only change is to the UI.
  35.  
  36. Miscellaneous new features.
  37. I added top and left properties so you can move the thing to where you want
  38. it at design time and it will stay there. Before, you would put it on the 
  39. form someplace and the next time you brought it up it "magically" moved to 
  40. the upper left corner.
  41.  
  42. I added a version stamp resource for those of you who need to keep 
  43. track of that.
  44.  
  45. For those of you who have never used it, I have included a winword doc
  46. that is the original text of the MSDN ariticle that explains the ins and 
  47. outs. 
  48.  
  49. Also in the zip file you will find several examples of how to use the 
  50. message blaster. These include a simple method for tying menus and status
  51. bars together so you can display messages as the user moves thru menus;
  52. a method for effectively creating a custom cursor in VB; and finally a 
  53. method for creating a small caption bar in VB. Good stuff. And you can't 
  54. beat the price.
  55.  
  56. Also, I recently left Microsoft to start my own business. Therefore, this 
  57. new version is longer free. It is shareware with a suggested price of $25. 
  58. Check the about box property of the details. Hey, it's only 25 bucks for 
  59. something I worked a lot on, so if you want to see more, let me know your 
  60. using it and appreciate it! For your 2000 bits, I'll send you the source 
  61. and you'll get free upgrades from here on out. Also, I am working on a OLE 
  62. control version of it, to be coming to a theater new you.
  63.  
  64. I will be happy to provide as much tech support as I have time for. However,
  65. you should understand that this control and it's use, assumes you have 
  66. knowledge of the underlying architecture of windows. If you don't understand
  67. Window's messaging, I don't have the time to explain it.
  68.  
  69. Lastly, I build these things because I thing they are fun to build. 
  70. If you have an idea for a control that you think would be a winner, drop 
  71. me a line or give me a call.
  72.  
  73. Oh yeah, one other thing, Bugs. While there are no know bugs in the vbx at
  74. this time, you never know. If you find one, let me know so I can fix it. 
  75. This thing has been in use by many, many programmers for a long time, so it's
  76. pretty stable. I am proud to say that it ships as part of a number of 
  77. Microsoft products!
  78.  
  79. Ed Staffin
  80. 758 N. Williams Drive
  81. Palatine, IL 60067
  82. phone 708-358-0484
  83.  
  84.  
  85. Later ... Ed
  86.  
  87. Message Blaster
  88. v. 1.1
  89.  
  90. Ok, here is the second release of my message blaster custom control for
  91. VB2. The primary differences are several bug fixes and a new message event 
  92. parameter. One other new feature is that you can now change the target 
  93. object at run time by merely setting the hWndTarget property.
  94.  
  95. What is it? Well, it's a control that will allow the VB programmer to catch
  96. and process Windows messages directly from within VB. This is accomplished
  97. by placing a message blaster on your form and specifying the object you
  98. want to catch messages for and what messages to catch. The message blaster
  99. should be able to catch just about any message for any control or form. You
  100. can catch up to 25 messages per target object. I suppose, if you needed to
  101. catch more than that, you could use 2 blasters and point them at the same
  102. object, but the idea of catching 25+ messages seems remote to me.
  103.  
  104. Normally, you would specify the target controls and what messages to catch
  105. in the form load section of your form. For example:
  106.  
  107. Sub Form_Load ()
  108.     Const PREPROCESS = -1
  109.     Const EATMESSAGE = 0
  110.     Const POSTPROCESS = 1
  111.     
  112.     MsgBlaster1.hWndTarget = text1.hWnd
  113.     MsgBlaster1.MsgList(0) = WM_NCHITTEST
  114.  
  115.     MsgBlaster2.hWndTarget = text2.hWnd
  116.     MsgBlaster2.MsgList(0) = WM_LBUTTONDOWN
  117.     MsgBlaster2.MsgPassage(0) = EATMESSAGE
  118.     MsgBlaster2.MsgList(1) = WM_RBUTTONDOWN
  119.     
  120.  
  121.     MsgBlaster3.hWndTarget = example.hWnd
  122.     MsgBlaster3.MsgList(0) = WM_MENUSELECT
  123.  
  124. End Sub
  125.  
  126.  
  127. Now, when you run your application, the Message Blaster will monitor the
  128. message stream for your targeted controls. When it finds a message that
  129. you are interested in it will fire an event as follows:
  130.  
  131. Sub MsgBlaster1_Message (MsgVal As Integer, wParam As Integer, lParam As Long, ReturnVal As Long)
  132.  
  133.     ' Do your message processing here
  134.  
  135.     MsgBox "Just got a WM_NCHITTEST"
  136.     
  137.     ' Do some processing to see where you hit and then return the appropriate
  138.     ' value to windows
  139.     
  140.     ReturnVal = HT_BORDER
  141.  
  142. End Sub
  143.  
  144. When dealing with windows messages there may be times when you would not
  145. want to pass the message you catch on to VB. This is why I provide a
  146. property array called MsgPassage. This property allows you to specify how
  147. you want the message blaster to handle target messages. PREPROCESS means
  148. that the message will be passed on to VB prior to the Message Blaster's
  149. message event is fired. EATMESSAGE is just what is suggests, the Message
  150. Blaster eats the message and fires the message event. POSTPROCESS, which is
  151. the default, means that the Message Blaster fires the message event first,
  152. then passes the message on to VB.
  153.  
  154. There is only a couple of messages that I know of that I can't
  155. catch...WM_CREATE and WM_NCCREATE. This is because The target control is
  156. already existant when you tell the message blaster about it.
  157.  
  158. I suppose I should put in a caution here. This is, in some ways, subverting
  159. VB. Because of this, the user of this control should be careful how they use
  160. this control. I have found that if VB is already providing support for
  161. certain messages (i.e. click, keypress etc.) don't use my control to catch
  162. them. Although it will work just fine, you may, on certain messages not
  163. always get the results you would expect.
  164.  
  165. Here are some of the things that I have heard that people want to use this
  166. for:
  167.  
  168. 1. Catching WM_MENUINIT and WM_MENUSELECT messages so they can change status
  169. bars as the user moves through menus.
  170.  
  171. 2. Catching WM_NCHITTEST for all kinds of things.
  172.  
  173. 3. Catching WM_DROPFILE
  174.  
  175. 4. Catching DDE stuff.
  176.  
  177. 5. Catching WAV file stuff
  178.  
  179. And I'm sure you'll find more.
  180.  
  181. I am including a file called Messages.txt that contains most of the Windows
  182. Messages defined in VB format (i.e. Global Const WM_MENUSELECT = &H11F).
  183.  
  184. There is also and example program that illustrates the use of the Message
  185. Blaster.                 
  186.  
  187. A new example, created by Jim Cash and Randall Kern, show how to use the msgblaster to create 
  188. small captioned window, similar to that of the toolbox in vb. Check it out
  189. it's cool!
  190.  
  191. Please let me know if there are any bugs. Also, if you have any ideas for
  192. improvement let me know. I would be very interested in hearing how you use
  193. this control.
  194.  
  195. Oh, by the way, check out the about box, it's good for my head.
  196.  
  197. I would like to thank chrisfr who helped me find a nasty bug that was 
  198. keeping me up at night.                                               
  199.  
  200. Also, thanks to Jimc and t-randyk for a nice improvement to the program.
  201.  
  202. Enjoy it!
  203.